<template>
  <!-- 分配权限的弹层 -->

  <el-dialog
    title="分配权限(一级为路由页面查看权限-二级为按钮操作权限)"
    :visible.sync="showDialogAssign"
  >
    <assign-permission @close="showDialogAssign = false" />
  </el-dialog>
</template>

<script>
import etPermissionList from '@/etPermissionList.vue'
import { getPermissionList } from '@/api/permissions'
import { tranListToTreeData } from '@/utils/index'
export default {
  data() {
    return {

    }
  },
  created() {
    this.loadPermissionList()
  },
  methods: {
    async loadPermissionList() {
      // 发送请求, 获取权限列表
      const { data } = await getPermissionList()
      console.log('权限列表的数据是', data)
      this.permissionData = tranListToTreeData(data)
    },

    // ... 省略其它
    //   showDialogAssign: false // 分配权限对话框
    components: {
      etPermissionList
    }

  }
}

</script>

<style>
</style>
